package com.inkyi.assistant.app.notepad.event;


import com.inkyi.framework.common.event.InkActionEvent;

public class NoteEvent extends InkActionEvent {
    /**
     * 打开笔记
     */
    public static final String TYPE_OPEN_NODE = "openNote";
    /**
     * 新建笔记
     */
    public static final String TYPE_NEW_NODE = "newNote";
    /**
     * 删除笔记
     */
    public static final String TYPE_DEL_NODE = "delNote";
    /**
     * 更新标题
     */
    public static final String TYPE_UPDATE_TITLE = "updateTitle";

    public NoteEvent(Object source, String type, Object data) {
        super(source, type, data);
    }

    public NoteEvent(Object source, String type) {
        super(source, type);
    }

    public static NoteEvent of(Object source, String type, Object data) {
        return new NoteEvent(source, type, data);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("NoteEvent{");
        sb.append("type='").append(type).append('\'');
        sb.append(", data=").append(data);
        sb.append('}');
        return sb.toString();
    }
}
